package com.starlink.model.util;

import com.starlink.model.dtomapper.MallRefundPriceDtoMapper;
import com.starlink.model.domain.MallRefundPriceDO;
import com.starlink.model.vo.MallRefundPriceVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class MallRefundPriceConvert {

    public static List<MallRefundPriceVO> buildMallRefundPriceVoList(List<MallRefundPriceDO> mallRefundPriceDOList) {
        if (CollectionUtils.isEmpty(mallRefundPriceDOList)) {
            return Lists.newArrayList();
        }
        List<MallRefundPriceVO> mallRefundPriceVOList = new ArrayList<>();
        for (MallRefundPriceDO mallRefundPriceDO : mallRefundPriceDOList) {
            mallRefundPriceVOList.add(MallRefundPriceDtoMapper.INSTANCE.do2VO(mallRefundPriceDO));
        }

        return mallRefundPriceVOList;
    }
}
